Hey everyone, this is Jacob here and recently I coded my own Robinhood trading bot using the pyrh library. I made a Youtube video of me actually coding it and the link to download is locating in the video as well, today I wanted to talk about my automated Robinhood stock trading bot so sit back and enjoy.
I've been building automated algorithmic trading bots for a while now and I know Robinhood is the most common brokerage for us millennials but from my previous research I could never find an API to use for Robinhood. In fact Robinhood does not have an official API, but some sneaky people have scraped and found an API to use and made easy to use for public software developers like myself. With a google search a couple of weeks ago I found at least 3 different unofficial Robinhood API's, heck yeah I'm totally coding a bot now!
So I ended up coding it in Python as most of viewers prefer that language probably because it's platform agnostic for the most part working on Windows, Apple and MacOS as well as Linux really well.
I imported the pyrh library which allows use to login in a Robinhood account and place trades, tulipy for indicators (this bot uses RSI to buy and sell) and schedulers libraries.
I then define a run() method and schedule it to run every 5 minutes to keep getting new price changes, then with tuliply I calculate the RSI (Relative Strength Index) for every 5 periods, if it's below 30 I place a buy order and when it's above 70 I place a sell order. In this example I used Ford Stock $F as it's a cheap stock.
I made some money on it too! If you want to see the results on how much I made and the full source code check out my Youtube video below, hope you found value in this WeTradeHQ guide!